package com.yzd.learnjava.util;

import java.util.ArrayList;

public class CollectionData<T> extends ArrayList<T> {
	
	public CollectionData(Generator<T> gen , int qty) {
		for(int i = 0 ; i < qty; i++) {
			add(gen.next());
		}
	}
	
	public static <T> CollectionData<T> List(Generator<T> generator , int qty){
		return new CollectionData<T>(generator, qty);
	}

}
